package pl.edu.pw.perg.compinfodb.dao;

import java.util.Collection;
import java.util.List;

public interface IGenericDAO<T> {

	public abstract Class<T> getPersistentClass();

	@SuppressWarnings("unchecked")
	public abstract T findById(Long id);

	@SuppressWarnings("unchecked")
	public abstract List<T> findAll();

	@SuppressWarnings("unchecked")
	public abstract List<T> findByExample(T exampleInstance,
			String[] excludeProperty);

	public abstract void flush();

	public abstract void clear();

	public void saveAll(Collection<T> items);

	public void save(T item);

	public void deleteAll();
	
	public void merge(T object);
}